package org.itstack.demo.design.impl;

import org.itstack.demo.design.ICouponDiscount;

import java.math.BigDecimal;

/**
 * @Author: fanYuLe
 * @CreateTime: 2023-12-29  09:26
 * @Description: n元购买
 */
public class NYGCouponDiscount implements ICouponDiscount<Double> {
    /**
     * 无论原价多少钱，都按固定金额购买
     * @param couponInfo 券折扣信息：直减、满减、折扣、N元购
     * @param skuPrice 商品金额
     * @return
     */
    @Override
    public BigDecimal discountAmount(Double couponInfo, BigDecimal skuPrice) {
        return new BigDecimal(couponInfo);
    }
}
